package com.scuec.tourismwebsite.service;

import com.scuec.tourismwebsite.entity.FreeformPostLike;
import com.scuec.tourismwebsite.mapper.FreeformPostLikeMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FreeformPostLikeServiceImpl implements FreeformPostLikeService{
    @Autowired
    private FreeformPostLikeMapper freeformPostLikeMapper;

    @Override
    public List<FreeformPostLike> selectFreeformPostLikeById(int user_id, int post_id) {
        return freeformPostLikeMapper.selectFreeformPostLikeById(user_id, post_id);
    }

    @Override
    public int deleteFreeformPostLike(int user_id, int post_id) {
        return freeformPostLikeMapper.deleteFreeformPostLike(user_id, post_id);
    }

    @Override
    public int insertFreeformPostLike(@Param("user_id") int user_id, @Param("post_id") int post_id) {
        return freeformPostLikeMapper.insertFreeformPostLike(user_id,post_id);
    }
}
